﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>

    <style type="text/css">
        #autocolor {
            width: 1000px;
            height: 700px;
            padding: 0.75em 0.5em 0;
            text-align: center;
            border: 1px solid black;
            margin: 3em auto 0;
            font: bold 90% sans-serif;
        }
    </style>

    <script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script src="js/hexcode.js" type="text/javascript"></script>
</head>
<body>
    <div>
        <div id="autocolor"></div>
    </div>

    <script type="text/javascript">
        $(function ($) {
            document.title = "Auto Color";

            var counter = -1;
            var hexlen = hexcode.length;

            function auto() {
                var curhex = hexcode[counter = ++counter % hexlen];
                $('#autocolor').css('background-color', curhex);
            }
            setInterval(auto, 100);
        });
    </script>

</body>
</html>